package com.hsogoo.collate.quartz;

import com.google.common.collect.Maps;
import org.quartz.JobDetail;

import java.util.Map;

/**
 * @Author huangsaigang
 * Created @2019-10-28.
 */
public class JobDetailRepository {

    private static Map<String, JobDetail> jobDetailRepository = Maps.newHashMap();

    public static void storeJob(String name, JobDetail jobDetail){
        jobDetailRepository.put(name, jobDetail);
    }

    public static boolean containJob(String name){

        if (jobDetailRepository.get(name) == null) {
            return false;
        }
        return true;
    }
}
